..  Copyright (C)  2011 - 2013  Stefano Mazzucco <stefano.mazzucco@gmail.com>.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.3
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled "GNU
    Free Documentation License".

The Report Files
================
The report files that are generated by Crystal Ball Plus are simple text files. Two different reports are generated: the *d-spacings* report and the *angles* report. The files are formatted in a way that the data can be easily copied to a spreadsheet application for further manipulation.

The *d-spacings* Report
------------------------
The *d-spacings* report lists what structures in the database match with the input data. The measured spacing from the input file, the reference spacing from the matching structure, *percent error* between the two and the matching *Miller plane* are given for each reflection. Depending on the options specified, the non-matching structures can also be listed.

The names of each input and reference files will be also listed along with information about the matching structure such as the name, the crystal system and the space group.

.. NOTE::

    A reflection may match to more than one plane within the given
    percent error. *All* the matching planes are listed.

A *d-spacing* report may look like this::

    #################    D-SPACING MATCH REPORT GENERATED ON Jul 24 2011    #################
    
    INPUT FILE: shot0107_FFT_DP_01.dfg
                                        REFERENCE FILE: Fe_gamma_FM3-M.dfg
    STRUCTURE: Iron - Gamma, Ht (Fe); SPACE GROUP: Fm-3m (225);
    CRYSTAL SYSTEM: cubic

    SPOT NO.    MEAS. SPACING    REF. SPACING    %ERROR     MILLER PLANE
           3            2.085           2.110     1.180       ( 1  1  1)
    --------------------------------------------------------------------------------

    INPUT FILE: shot0107_FFT_DP_01.dfg
                                        REFERENCE FILE: FeO_R3-R.dfg
    NO MATCHES

    --------------------------------------------------------------------------------
    INPUT FILE: shot0107_FFT_DP_01.dfg
                                        REFERENCE FILE: Fe5C2_P1.dfg
    STRUCTURE: Iron Carbide (5/2) - chi (Fe5 C2); SPACE GROUP: P-1 (2);
    CRYSTAL SYSTEM: triclinic

    SPOT NO.    MEAS. SPACING    REF. SPACING    %ERROR     MILLER PLANE
           1            2.510           2.506     0.152       ( 0  0  2)
           1            2.510           2.521     0.417       ( 1  0 -2)
           2            2.299           2.286     0.586       ( 0  2  0)
           2            2.299           2.293     0.275       ( 5  0  0)
           2            2.299           2.291     0.358       ( 4 -1 -1)
           2            2.299           2.290     0.380       ( 4  1 -1)
           3            2.085           2.078     0.337       ( 0  2 -1)
           3            2.085           2.081     0.178       ( 0  2  1)
           3            2.085           2.095     0.463       ( 4  1  1)
           3            2.085           2.065     0.949       ( 1  2 -1)
           3            2.085           2.068     0.822       ( 1 -2 -1)
           3            2.085           2.092     0.320       ( 4 -1  1)
    --------------------------------------------------------------------------------

The *angles* Report
-------------------

Similarly to the *d-spacings* report, the *angles* report will list the names of the input and reference files along with the information about the structure. The matching angles between any two reflections are then given (so for example, for three reflections there will be three angles listed, for four reflections there will be six angles, etc.) with the corresponding *Miller planes*, angle values and *percent error*.

An *angle* report may look like this::

    ###################    ANGLE MATCH REPORT GENERATED ON Jul 24 2011    ###################

    INPUT FILE: shot0187_FFT_DP_01.dfg
                                        REFERENCE FILE: Fe3C_PNMA_cohenite.dfg
    STRUCTURE: Iron Carbide (3/1) - cohenite (Fe3 C); SPACE GROUP: Pnma (62)
    CRYSTAL SYSTEM: orthorhombic

    1ST SPOT    2ND SPOT        1ST PLANE        2ND PLANE    MEAS. ANGLE    REF. ANGLE    %ERROR    ZONE AXIS
    =======
    MATCH_0

           1           2       ( 2  0  0)       ( 1  0  2)         64.790        66.019     1.862      [0 1 0]
           2           3       ( 1  0  2)       (-1  0  2)         48.960        47.962     2.081      [0 1 0]
           1           3       ( 2  0  0)       (-1  0  2)        113.750       113.981     0.203      [0 1 0]
    =======
    MATCH_1

           1           2       ( 2  0  0)       ( 1  0 -2)         64.790        66.019     1.862      [0 1 0]
           2           3       ( 1  0 -2)       (-1  0 -2)         48.960        47.962     2.081      [0 1 0]
           1           3       ( 2  0  0)       (-1  0 -2)        113.750       113.981     0.203      [0 1 0]

.. NOTE::
    While in the *Diffractogram* (**.dfg**) files the angular value **must** be relative to a given axis (keyword angle_to_x, see :doc:`fileformat`), the *angles* report will always give the absolute angle between two reflections.
